<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="../principal.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="principal">
        <h2>Emitir Relatórios Gerenciais</h2>
        
        <h:form id="breadcrumb">
            <p:breadCrumb styleClass="navegacao" style="margin-top: 5px; margin-bottom: 40px">  
                <c:if test="#{loginMB.dentista.contaUsuario.tipo == 'AD'}" >  
                    <p:menuitem value="Categories" url="../user-master/menuMaster.xhtml" />  
                </c:if>
                <c:if test="#{loginMB.dentista.contaUsuario.tipo == 'DE'}" >  
                    <p:menuitem value="Categories" url="../user-simple/menuDentista.xhtml" />  
                </c:if>
                <p:menuitem value="Clínica" url="../clinica/adminClinica.xhtml" />  
                <p:menuitem value="Relatórios Gerenciais" url="emitirRelatorioGerencial.xhtml" />
            </p:breadCrumb>
        </h:form>
        
        <h:form id="cad">
                <p:growl id="message"/>
                
                <p:fieldset legend="SELECIONE O TIPO DE RELATÓRIO" toggleable="true" toggleSpeed="500" styleClass="grupo-form">
                    <h:panelGrid columns="2" styleClass="table-form" cellspacing="10">
                        <h:outputLabel for="tipo-atestado" value="*Tipo de Atestado: " />
                        <p:selectOneMenu id="tipo-atestado" value="#{emitirRelatorioGerencialMB.tipo}">  
                            <f:selectItem itemLabel="Selecione..." itemValue="nada" />  
                            <f:selectItem itemLabel="Relatório de Pacientes Cadastrados" itemValue="pacientes" />
                            <f:selectItem itemLabel="Relatório de Itens de Estoque" itemValue="estoque" />
                        </p:selectOneMenu>
                    </h:panelGrid>
                </p:fieldset>
                
                <h:panelGrid columns="1" style="text-align: right; width: 100%;">
                    <p:commandButton value="Emitir" action="#{emitirRelatorioGerencialMB.emitirRelatorio()}" image="ui-icon-print" style="font-size: 15px;" ajax="false" />
                </h:panelGrid>
        </h:form>
    </ui:define>
</ui:composition>